package com.sky.mapper;

import com.sky.Annotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 根据菜品id查套餐id
     * @param ids
     * @return
     */

    public List<Long> getsetmealIdsByDishId(List<Long> ids);

    @AutoFill(OperationType.INSERT)
    void insert(List<SetmealDish> setmealDishes);

    void delete(List<Long> ids);


    List<SetmealDish> getdishBysetmealId(Long id);

    @Delete("delete from setmeal_dish where setmeal_id=#{setmealId}")
    void deleteById(Long setmealId);
}
